<?php

if(!defined('ADMIN')){
	exit('Access Denied');
}
if(isset($_GET["id"])){ $_POST['ids']=$_GET["id"];}
$id_arr=$_POST['ids'];
if(!empty($id_arr)){
    if(!is_array($id_arr)){
        $id_arr1[]=$id_arr;
    }else{
        $id_arr1=$id_arr;
    }
    //需要判断是否有审核权限
    
    

    $allrow=$ezhand->select_all("thread t,category m","t.id,t.status,m.workflowid,t.catid","t.catid=m.id and t.id in (".implode(",",$id_arr1).")");

   while(list($k,$row)=each($allrow)){     
        $tid=$row["id"];
        $workflowid=$row["workflowid"];
        $status=$row["status"];
        $catid=$row["catid"];
        
        $status=14;
            $wlog=array(
            "tid"=>$tid,
            "uid"=>$_SESSION['EZ_Admin']['id'],    
            "username"=>$_SESSION['EZ_Admin']['name'],
            "updatetime"=>time(),
            "status"=>$status,
            "ip"=>get_client_ip()
            );
            $tid2=$ezhand->insert("workflow_log",$wlog);
        
        $re=$ezhand->update("thread",array("status"=>$status),"id=".$tid);
        
     }
    
    
    
    

}
jumpajax('200','所选择内容已经被拒绝审核',"","","page".$catid);

?>